Skip to content

Conversation

@robholland
Copy link
Contributor

@robholland robholland commented Nov 14, 2025

What changed?

Added rate limiting for persistence calls for history replication system. Set this high enough not to limit us by default.

Why?

This allows us to limit the impact of large replicated workflow histories on the persistence layer.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Note

Introduce dynamic-configured persistence QPS limiter for history replication and backfill, wired through FX and enforced in replicator methods.

  • History Replication:
    • Add dynamic config history.ReplicationTaskProcessorApplyPersistenceQPS and expose via configs.Config.
    • Implement PersistenceRateLimiter and provider (replication/quotas.go), registered in replication/fx.Module.
    • Inject rate limiter into engine (history_engine.go, factory) and pass to ndc.NewHistoryReplicator.
    • Update HistoryReplicatorImpl to use the limiter (Wait) in ApplyEvents, BackfillHistoryEvents, and ReplicateHistoryEvents.

Written by Cursor Bugbot for commit 26deef2. This will update automatically on new commits. Configure here.

@robholland robholland requested review from a team as code owners November 14, 2025 15:48
@robholland robholland marked this pull request as draft November 14, 2025 15:50
@robholland robholland marked this pull request as ready for review November 14, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants